package com.xxkfz;

import lombok.extern.slf4j.Slf4j;
import net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 https://zhuanlan.zhihu.com/p/403824645
 */
@SpringBootApplication
@EnableScheduling
//defaultLockAtMostFor参数指定在执行节点结束时应保留锁的默认时间量,它使用ISO8601 Duration格式
@EnableSchedulerLock(defaultLockAtMostFor = "PT30S")
@Slf4j
public class XxkfzRedissonApplication {

    public static void main(String[] args) {
        SpringApplication.run(XxkfzRedissonApplication.class, args);
    }

}
